<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    var n = window.prompt("输入一个数字");
   /* if (isNaN(n)){
        alert("输入有误")
    }else{
        if (n%2==0){
            alert("偶数")
        }else {
            alert("奇数")
        }
    }*/
    switch (parseInt(n)) {
        case 1:
            break;
            case 2:
                break;
                case 3:
                    break;
        case 4:
            break;
        case 5:
            break;
        case 6:
            break;
        case 7:
            alert("星期天")
            break;
            default:
                alert("输入有误")
    }
</script>
</html>